{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/root/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
      "  from .autonotebook import tqdm as notebook_tqdm\n"
     ]
    }
   ],
   "source": [
    "import torch\n",
    "from torch.utils.data import DataLoader\n",
    "from transformers import BertTokenizer, BertForSequenceClassification, get_scheduler\n",
    "from datasets import load_dataset,Dataset\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.metrics import accuracy_score, classification_report\n",
    "from torch.optim import AdamW\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "device(type='cuda', index=0)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "device = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\n",
    "device"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_test = pd.read_csv('/root/data/test_a.csv', sep='\\t')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dataset({\n",
       "    features: ['text'],\n",
       "    num_rows: 50000\n",
       "})"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_dataset = Dataset.from_pandas(df_test)\n",
    "test_dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "tokenizer = BertTokenizer.from_pretrained('/root/model/bert-base-chinese')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def preprocess_function(examples):\n",
    "    return tokenizer(examples['text'], truncation=True, padding=True, max_length=128)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Map: 100%|██████████| 50000/50000 [13:36<00:00, 61.27 examples/s]\n"
     ]
    }
   ],
   "source": [
    "encoded_dataset = test_dataset.map(preprocess_function, batched=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_dataset_torch = encoded_dataset.with_format('torch')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dataset({\n",
       "    features: ['text', 'input_ids', 'token_type_ids', 'attention_mask'],\n",
       "    num_rows: 50000\n",
       "})"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_dataset_torch"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_loader = DataLoader(test_dataset_torch, batch_size=16)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<torch.utils.data.dataloader.DataLoader at 0x7f95b024f430>"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_loader"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Some weights of BertForSequenceClassification were not initialized from the model checkpoint at /root/model/bert-base-chinese and are newly initialized: ['classifier.bias', 'classifier.weight']\n",
      "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
     ]
    }
   ],
   "source": [
    "# 加载模型\n",
    "# 1. 初始化模型（架构必须与保存时相同）\n",
    "model = BertForSequenceClassification.from_pretrained('/root/model/bert-base-chinese', num_labels=14)  # 假设有2个分类标签"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<All keys matched successfully>"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2. 加载状态字典\n",
    "model.load_state_dict(torch.load('BertForSequenceClassification.pth'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "BertForSequenceClassification(\n",
       "  (bert): BertModel(\n",
       "    (embeddings): BertEmbeddings(\n",
       "      (word_embeddings): Embedding(21128, 768, padding_idx=0)\n",
       "      (position_embeddings): Embedding(512, 768)\n",
       "      (token_type_embeddings): Embedding(2, 768)\n",
       "      (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
       "      (dropout): Dropout(p=0.1, inplace=False)\n",
       "    )\n",
       "    (encoder): BertEncoder(\n",
       "      (layer): ModuleList(\n",
       "        (0-11): 12 x BertLayer(\n",
       "          (attention): BertAttention(\n",
       "            (self): BertSdpaSelfAttention(\n",
       "              (query): Linear(in_features=768, out_features=768, bias=True)\n",
       "              (key): Linear(in_features=768, out_features=768, bias=True)\n",
       "              (value): Linear(in_features=768, out_features=768, bias=True)\n",
       "              (dropout): Dropout(p=0.1, inplace=False)\n",
       "            )\n",
       "            (output): BertSelfOutput(\n",
       "              (dense): Linear(in_features=768, out_features=768, bias=True)\n",
       "              (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
       "              (dropout): Dropout(p=0.1, inplace=False)\n",
       "            )\n",
       "          )\n",
       "          (intermediate): BertIntermediate(\n",
       "            (dense): Linear(in_features=768, out_features=3072, bias=True)\n",
       "            (intermediate_act_fn): GELUActivation()\n",
       "          )\n",
       "          (output): BertOutput(\n",
       "            (dense): Linear(in_features=3072, out_features=768, bias=True)\n",
       "            (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True)\n",
       "            (dropout): Dropout(p=0.1, inplace=False)\n",
       "          )\n",
       "        )\n",
       "      )\n",
       "    )\n",
       "    (pooler): BertPooler(\n",
       "      (dense): Linear(in_features=768, out_features=768, bias=True)\n",
       "      (activation): Tanh()\n",
       "    )\n",
       "  )\n",
       "  (dropout): Dropout(p=0.1, inplace=False)\n",
       "  (classifier): Linear(in_features=768, out_features=14, bias=True)\n",
       ")"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " # 3. 将模型设置为评估模式（如果需要）\n",
    "model.eval()\n",
    "model.to(device)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1 2 8 5 0 4 2 1 6 5 1 0 3 6 0 1]\n",
      "[2 1 7 0 2 5 7 6 3 8 1 2 2 6 0 7]\n",
      "[1 1 6 0 3 0 5 3 4 2 1 2 1 1 1 2]\n",
      "[ 2  0  5  2  3  1  0 10  5  7  0  3  5  3  0  5]\n",
      "[ 2 13  1  0  2  2  6  1  4  4  0  2  2  2  3  0]\n",
      "[ 8  8  1  4  9  1  1 10  3  0  9  1  1  8  3  7]\n",
      "[10 10  0  0  2  0  6  3  0  0  3  2  8  4  1  2]\n",
      "[2 3 5 2 1 7 2 1 0 2 1 3 2 9 2 1]\n",
      "[1 0 0 4 2 2 2 2 0 0 0 0 1 0 6 5]\n",
      "[1 0 0 0 0 5 3 1 2 1 3 7 2 8 5 5]\n",
      "[2 8 2 9 3 0 6 5 2 1 3 4 2 3 0 3]\n",
      "[7 0 2 1 4 3 1 4 8 2 8 2 2 9 2 7]\n",
      "[1 4 0 3 6 7 0 7 9 8 0 2 0 6 2 3]\n",
      "[ 2  0  1  7  2  7  1  3  2  0  3 10  9  4  2  0]\n",
      "[ 3  8  1  1  0  1  1  6 11  2  4  5  3  1  1  0]\n",
      "[ 1 10  0  8 11  0  3  8  3  1  0  4  0  1  3  3]\n",
      "[ 4  2  1 11  2  1  0  2  7  1 11  0  0  6  2  0]\n",
      "[5 1 1 3 4 1 1 4 8 6 3 0 0 1 5 3]\n",
      "[7 1 5 7 4 4 0 8 2 0 0 1 6 2 4 5]\n",
      "[ 3 13  7  1  2  6  1  3  2 10  1  1  3  4  0  2]\n",
      "[ 5  1 13  2 10  4  2  0  7  3  1  1  1  2 10  0]\n",
      "[1 1 1 3 7 7 1 4 0 2 5 0 4 0 7 0]\n",
      "[0 5 2 3 0 1 2 2 1 1 7 7 7 2 2 2]\n",
      "[ 2  1  1  0  1  7  7  0  6 10  1  5  2  0  2  5]\n",
      "[8 1 1 2 1 0 2 1 0 0 7 5 0 0 4 6]\n",
      "[ 2  6  5  8  4  3 10  1  6  1  7  1  0  0  0  4]\n",
      "[ 2  9  9  4  1  7 12  2  3  3  3 10  0  4  5  9]\n",
      "[ 1 10 10  3  1  0  1  1  3  0  0  1  2  8  0  0]\n",
      "[0 3 4 3 2 0 8 5 2 9 4 1 4 5 5 1]\n",
      "[ 5  2  0 12  0  1  1  5  2  4  9  0  1  0  4  3]\n",
      "[ 3  1  2  1  1  3  3  0  7  3  4 10  3  1  3  4]\n",
      "[ 1  0  3  0  1  7 10  3  3  1  6  6  2  3  0  2]\n",
      "[3 6 4 4 2 2 0 2 0 3 0 2 0 0 4 0]\n",
      "[ 0  1  1  4 11  1  0  3  1  1  0  3 10  2  5  1]\n",
      "[1 2 3 5 4 2 2 4 5 3 1 0 0 1 3 1]\n",
      "[ 1  9  2  5 10  1  5  2  0 11  1  7  6  1  8  2]\n",
      "[ 9 10  7  8  0  0  9  0  9  5  2 13  0  0  2  2]\n",
      "[10 10  4  7  9  0  1  3  6  2  0  2  4 10  3  0]\n",
      "[ 6 11  4  4  1  0  9  1  2  3  0  5  3  1  4  0]\n",
      "[4 1 2 1 3 9 8 4 0 3 0 0 2 3 3 1]\n",
      "[ 2 10  0  0  6  1  1  2  1  1  8  0  3 10  0  3]\n",
      "[ 2  1  9  7  2  1  0  3 10  1 10  1  0  2  1  8]\n",
      "[ 7  0  3  1 10  5  7  1  3  0  7 10  4  0  5  0]\n",
      "[ 4 11  2  5  5  2  3  6  0  6  1  1  0  1  0  1]\n",
      "[ 3  9  1  4  5  3  5  5  0  8  3 10  4  0  5  3]\n",
      "[ 0  3  2  1  2  0  3  3  1 11 10  0  8  0  0  1]\n",
      "[ 8  1 12  2  4  5  4  2  1  1  5  6  1  0  1  8]\n",
      "[ 4  3  5  1  0 10  3 10  2  5  7  4  7  3  2  4]\n",
      "[ 2  3  1  3  7  9  2  4 10  0  6  1  1  1  3  1]\n",
      "[ 6  0  0  2  0  1  1  8  0  0  8 11  1  8  2  9]\n",
      "[ 7  2  1  4  2  0 10 11  2  1  1  3  0  4  2  0]\n",
      "[ 1 11  5  2  0  2  4  1  7  0 10 10  0  1  6  2]\n",
      "[8 9 3 9 3 1 2 3 0 0 4 4 3 2 5 3]\n",
      "[5 3 0 1 0 5 1 2 3 4 0 1 1 4 2 1]\n",
      "[13  2 10  1  0  3  6  0  2  0  1  7  9  0  7  2]\n",
      "[ 0  2  5  3  2  5  3  4  5  7  0 10  2  0  3  0]\n",
      "[2 0 9 0 0 2 4 0 0 7 1 6 2 0 4 1]\n",
      "[ 8  3  1  2  5  5  1  2  6  2  1  6  0  1  4 12]\n",
      "[ 0 11  7  3  0  0  4  3  7  1  4  2  3  3  2  2]\n",
      "[11  3 10  0  0  0  1  3  8  2  2  9  0  0  2  1]\n",
      "[7 9 1 5 2 0 0 7 6 3 8 1 0 8 1 2]\n",
      "[0 2 1 2 1 6 1 7 5 0 0 3 0 5 2 0]\n",
      "[4 1 0 1 4 0 2 2 2 2 6 0 3 6 9 0]\n",
      "[ 0  5  1  4  3  4  0  4  2  1 10  8  1  6  2 12]\n",
      "[ 1  3  0  1  0  2  3  1  0 10  3  5  1  0  3  2]\n",
      "[ 2  2 10  1  8  0 11  4  0  7  0  3 10  0  7  1]\n",
      "[0 2 8 0 1 1 0 3 3 1 3 3 2 9 0 0]\n",
      "[2 3 2 7 9 5 1 0 2 2 0 7 5 1 3 0]\n",
      "[2 3 6 1 2 9 6 7 3 1 8 5 2 4 0 7]\n",
      "[ 1  5  5  2  3  1  0  3  4  3  3  0 11  3  0  2]\n",
      "[ 1  6  5  0  0  5  1 11  2  0  1  0  8  6  1  2]\n",
      "[3 0 3 1 1 1 9 7 3 3 1 0 2 1 0 1]\n",
      "[ 5  3  8  0  1 11 12  4 10  1  2 13  2  0  2 12]\n",
      "[ 0 12  4  0  1  2  2  0  6  3  3  4  0  9  0  9]\n",
      "[ 1  0  2  1  2  1  9 12  6  2  2  1  3  0  2  0]\n",
      "[0 2 8 0 2 4 3 3 1 5 3 4 2 0 1 4]\n",
      "[8 1 0 8 8 6 4 2 2 1 7 1 1 9 1 0]\n",
      "[11  7 10  1  4 13  0  2  4  4  9  6  2  4  0 10]\n",
      "[2 3 8 9 3 0 3 2 3 5 0 2 0 4 7 1]\n",
      "[ 8  2  0  1  9  4  4  1  2  8  5  2 10  0  5  4]\n",
      "[1 7 1 2 5 1 1 2 2 5 0 2 5 1 3 0]\n",
      "[ 0  5  2 13  0  5  4  3 11  2  2  2  3  0  0  0]\n",
      "[5 3 5 2 8 1 0 2 1 1 0 0 6 0 8 3]\n",
      "[ 0  7 11  4  0  4  2  2  4  2  2  1  9  1  3  0]\n",
      "[ 1  0 10  2  3  7  5  0  5  5  5  0  0  2  2  3]\n",
      "[1 8 1 4 3 6 0 5 1 7 1 1 3 0 2 3]\n",
      "[ 0  1  9  6  2  6  1  2  5  0  2  1 10  6  4 12]\n",
      "[ 0  2  8  3  8  8  2 11  0  8  0  1  0  1  0  9]\n",
      "[ 2  9  9  2  0  0  1  5  6  7 10  2  3  4  1  4]\n",
      "[ 1  6  1  6  2 11  0  1  1  5 10  0  5  8  1  0]\n",
      "[0 8 1 5 5 2 2 5 7 4 7 4 2 1 2 3]\n",
      "[3 4 1 0 0 0 5 1 1 7 0 0 2 4 3 4]\n",
      "[12  3  0  5  2  0  2 11 10  6  2  0  2  1  2  1]\n",
      "[4 2 4 5 7 1 2 1 2 1 3 5 5 2 2 0]\n",
      "[1 5 5 3 5 0 3 3 1 6 9 0 1 3 1 0]\n",
      "[ 1  1 12  1  0  5  0  1  1  2  6  0  2  0  0  1]\n",
      "[3 7 4 6 2 2 0 3 1 2 2 3 3 8 4 2]\n",
      "[12  4  0  3  2  2  2  8  3  5  2  1  3  2  6  4]\n",
      "[2 2 8 0 4 3 3 4 0 0 1 0 8 0 2 0]\n",
      "[1 0 7 0 4 3 7 7 2 1 3 1 1 2 4 1]\n",
      "[ 1  0  4  2  1  2  3  3  3  8  1  2 12  3 10  1]\n",
      "[0 3 2 3 0 5 0 8 8 6 1 0 2 0 1 0]\n",
      "[0 2 0 0 0 8 5 6 2 5 3 0 2 2 2 3]\n",
      "[4 2 0 8 2 9 7 0 7 0 0 0 2 1 8 2]\n",
      "[11  9  0  4  0  8  1  3  5  1  3  9  0  2  3  2]\n",
      "[ 4  1  0 12  2  1  1  2  4  2  2  6  1  8 10  7]\n",
      "[0 4 2 0 5 1 8 1 2 1 5 0 3 1 0 0]\n",
      "[0 1 2 0 4 7 2 4 0 2 6 0 2 1 2 2]\n",
      "[0 0 3 0 4 2 2 5 1 0 3 2 2 6 1 5]\n",
      "[6 2 1 1 0 2 1 8 1 2 0 3 6 0 9 0]\n",
      "[11  1  0  0  0  4  8  4  4  2  3  2  3  9  1  1]\n",
      "[3 1 0 4 7 0 0 1 3 2 1 1 0 8 8 7]\n",
      "[ 1  6  2  3  1  1  9  9  3  2 10  0  7  0  0  8]\n",
      "[1 1 1 0 0 8 1 7 3 0 8 0 3 5 1 2]\n",
      "[2 3 2 6 0 2 0 3 0 7 1 0 8 4 0 2]\n",
      "[ 8  0  2  2  1  2 10  2  2  0  7  4  3  0  1  1]\n",
      "[2 3 7 5 2 3 0 3 7 5 2 1 9 2 5 2]\n",
      "[1 5 4 5 2 3 0 0 5 9 0 9 1 7 0 0]\n",
      "[ 2 11  0  0  7 12  4  0  0  2  4  0  0  2  7  9]\n",
      "[ 2  1  8  1  0  1  2  3  7  0  4 10  1  9  1  1]\n",
      "[ 3 13  1  0  0  0  2  1  2  5  2  2  8  5  0 10]\n",
      "[ 1  5  1  0  3  2 10  2  9  3  0  1  1  1  1  7]\n",
      "[ 1  0  7  0  0  3  1  2  6 10  0  7  0  2  8  0]\n",
      "[ 0  4  1  2  1  1  2  0  0  8 11  1  2  0  2  5]\n",
      "[ 3  2 11  4  1  5  7  8  2  0  1  1  3  2  2  1]\n",
      "[ 0  2  2 10  4  3  9  0  0 10  2  0  3  1  2 10]\n",
      "[ 5  4  2  5 13  2  6  9  2  1  2  2  1  1  1  4]\n",
      "[ 1  0  3  0  5  4  8  2  0  3  9 12  3  3  1  6]\n",
      "[8 4 3 2 0 1 1 1 0 8 4 4 0 0 5 8]\n",
      "[ 4  1  7  4  1  0  0 10  1  1  3  0  2  4  2  1]\n",
      "[ 4  6  0 12  3  2  0  5  3  2 11  6  4  5  2  1]\n",
      "[ 2  0  1 11  1  3  0  0  3  5  0  4  5  1  7  2]\n",
      "[ 3  0  8  2  1  2  1  1 12  8  5  1  0  2  2  0]\n",
      "[ 2  3  0  1  2  2  7 12  6  1  4  8  1  2  2  3]\n",
      "[ 1  4  4  3  1 13  6  3  1  1  8  1  2  4  3 12]\n",
      "[ 3  1  2  3  0  0  2  1  1  5 10  9  0  3  1  3]\n",
      "[ 3  5  0  5  4  0  7  0  3 12  3  0  5  5  0  0]\n",
      "[ 2  1  1  1  0  0  5  0  4  1  0  0 11  5  7  0]\n",
      "[ 1  1  0  3 13  0  3  2  9 10 12  3 12  0  0  9]\n",
      "[ 2 11  1  6  3  2  0  2  1  2  6  6  0  2  1  0]\n",
      "[ 0  0  0  0  1 12  0  0 12  2  1  5  0  1  1  3]\n",
      "[0 3 0 1 2 7 0 0 1 4 2 0 0 1 9 3]\n",
      "[ 3  8  1  4  1  0 12  7  1  2  1  8  1  1  7  4]\n",
      "[2 1 2 1 0 3 2 2 0 6 3 4 6 0 5 0]\n",
      "[0 3 2 0 0 2 0 2 9 1 0 1 0 3 4 1]\n",
      "[3 1 1 8 0 6 2 2 2 1 1 1 0 5 3 7]\n",
      "[0 0 9 0 1 0 9 7 1 1 5 2 3 0 5 1]\n",
      "[ 2  8  8  1  1  2  2 10  1  6  0  3  6  5  3  0]\n",
      "[ 1  1  2  1 10  0 11  6  3  2 10  5  8  8  3  0]\n",
      "[1 0 1 5 0 1 2 0 1 8 5 2 0 1 0 8]\n",
      "[3 1 2 1 3 0 5 6 3 0 1 3 1 5 3 4]\n",
      "[ 2  1  2  2  1  0  0  1  4  4  4 13  3  5  2 10]\n",
      "[ 0 11  2  1  3  0  1  1 10  0  3  0  1  0  4  2]\n",
      "[1 2 7 0 7 1 0 0 1 0 3 2 0 1 8 4]\n",
      "[3 1 1 4 0 7 3 3 3 7 0 2 5 2 4 8]\n",
      "[ 5  4  3  1  2  1  2  3  6  3  1  6 12  0  1  3]\n",
      "[ 2  1  3  2  0  4  2  2  0  4  1 11  3  1  0  7]\n",
      "[ 4  3  2  2  2  7  9 12  2  8  5  1  8  0  2  9]\n",
      "[ 0 10  3  1  0  7  4  3  0  5  0  4  9  3  0  1]\n",
      "[ 0  1  1 11  1  6  2  2  3  3  2  3  1  2  7  7]\n",
      "[2 0 6 1 0 9 0 1 0 1 2 8 0 8 1 1]\n",
      "[1 7 2 1 9 3 7 7 6 0 3 8 2 1 6 3]\n",
      "[ 3  8  2  0  1  2 12 12  1  2  4  1  9  6  0  2]\n",
      "[ 7  3  2  1  0 13  9  7  7  1  2  0  2  0  2  8]\n",
      "[ 1  2  4  0  4  0  8  4  7  4  2 10  4  2  4  7]\n",
      "[1 9 0 0 1 5 0 3 1 8 2 2 0 2 2 2]\n",
      "[ 7  0  1  0  7  0 11  6  1  0  1  0  3  5  7  0]\n",
      "[ 3  1  2  3  4 12  7  5  6  2  1  1  1  3  2  1]\n",
      "[ 2  0  3 10  0  1  5  5  1  8  0  7  8  1  0  1]\n",
      "[ 0  0  9  3  1  3  0  4  9  0  0 11  6  0  0  2]\n",
      "[ 4  5  7  9  2  6  1  1  1  1  0  6 11  1  3  0]\n",
      "[ 2  0  0 13  1  3  0  6  0  8  0  6  1  0  3 10]\n",
      "[0 1 0 1 0 6 2 0 2 1 2 3 0 3 1 5]\n",
      "[ 2 12  2  6  8 13  0  5  5  0  4  9  6  2  4  9]\n",
      "[ 1  8  1  0  0  3  3  1 11  3  5  2  1  1  0  7]\n",
      "[8 0 0 1 0 1 5 6 0 0 8 0 4 7 2 1]\n",
      "[1 8 2 3 1 2 4 5 0 5 5 9 5 5 2 2]\n",
      "[ 0  3  8  4  1  0  1  4  2  1  0  1  8  0 11  4]\n",
      "[ 2 11  0  1  5  1  6  2  4  8  8  2  5  7  1  1]\n",
      "[ 4 11  0  1  5  1  2  1  1  2  1  7  2  7  8  0]\n",
      "[2 0 0 1 8 8 3 2 4 7 7 2 5 3 6 7]\n",
      "[1 3 4 0 7 0 5 1 1 4 0 1 2 3 5 9]\n",
      "[3 4 0 9 0 2 1 2 1 1 2 4 0 5 0 5]\n",
      "[6 2 9 2 2 0 5 5 0 1 0 1 4 8 6 2]\n",
      "[ 2  2  9  7  1  1  3  2 11  8  0  0  5  3  4 11]\n",
      "[8 3 6 1 5 3 1 0 8 0 1 7 6 0 2 5]\n",
      "[9 2 2 4 7 4 3 1 1 3 1 0 1 4 5 8]\n",
      "[ 2 12  3  3  2  2  2  2  4  1  1  4  1  9  1  7]\n",
      "[1 3 7 3 6 8 1 1 0 8 1 0 2 8 2 2]\n",
      "[ 5  2  1  6  4  0 10  0  0  0  2  1  5  1  2  6]\n",
      "[ 3  1  0  6  0  4  2  1  1  0  3  2  3 10  1  4]\n",
      "[0 0 0 4 5 8 0 0 0 3 0 1 9 1 3 0]\n",
      "[ 7  1  3  4  3  0 10  6  2  2  0  0  2  5  0  0]\n",
      "[ 2  1  8  0  0  2  1  0 10  7  3  1  8  1 10  1]\n",
      "[9 1 1 4 5 4 1 2 1 3 4 7 4 6 9 0]\n",
      "[7 2 0 5 4 3 0 0 0 2 8 2 9 8 1 2]\n",
      "[5 2 1 0 3 3 7 1 1 5 0 4 5 4 0 4]\n",
      "[5 5 0 3 5 2 5 1 2 9 5 6 1 0 6 1]\n",
      "[4 1 2 7 3 8 1 8 2 5 0 1 0 4 2 1]\n",
      "[11  0  2  1  1  1  1 11  7  5  2  1  3  1  2  9]\n",
      "[3 7 2 5 1 5 6 5 4 2 8 1 0 1 3 1]\n",
      "[ 2  8  2  2  2 11 12  0 11 10  2  2  1  8  3  6]\n",
      "[1 0 1 0 0 0 3 1 4 1 1 2 0 2 5 4]\n",
      "[3 2 1 0 1 1 9 8 0 6 0 2 2 0 9 4]\n",
      "[1 2 0 5 1 1 5 0 1 0 1 6 0 1 0 1]\n",
      "[ 0  0  3 10  2  7  9  3 13 10  8  9  3  4  2 12]\n",
      "[2 4 8 2 3 0 6 8 0 0 1 4 2 5 4 6]\n",
      "[ 7  0  3  1  0 11  2  4  0  5  3  1  6  3  3  0]\n",
      "[ 2 11  3  1  1  3 13  3 10  3  1  2  1  1  5 10]\n",
      "[ 3  4  0  0 10  4  5  1  3  2  1  2  2  1  0  1]\n",
      "[1 5 1 3 1 3 0 0 3 3 7 0 6 2 3 2]\n",
      "[2 0 5 2 2 1 7 0 4 3 0 1 4 8 1 2]\n",
      "[1 0 1 2 0 3 4 3 8 4 2 3 2 2 1 1]\n",
      "[ 8  1  1  5 10  6  0  3  6  6  3  0  3  3  2  5]\n",
      "[2 9 3 4 0 1 8 4 1 3 0 0 2 2 0 0]\n",
      "[0 3 0 1 7 5 3 8 2 5 7 6 1 0 0 5]\n",
      "[ 5  6  5  0 12  0 11  2  4  0  0  1  3  3  2  0]\n",
      "[ 0  4  0  6  3  2  3  6  0  6  2  3  2 10  3  4]\n",
      "[ 2  4  0  2  2  5  3  3  0  9  0  4  6  1  0 10]\n",
      "[6 3 2 2 6 8 1 7 3 0 1 1 2 5 1 1]\n",
      "[ 1  6 10  2  0  7  6  8  4 10  1  1  5  3  5  4]\n",
      "[ 1  4  1  1  3  9  1  7  0  2 11  2 11  4  5  3]\n",
      "[ 2  6  1  1  4  5  2 11  3  4  6  2  4  2  2  8]\n",
      "[0 4 3 6 6 0 9 1 5 5 0 7 5 3 0 2]\n",
      "[ 1  5  4  5  2  0 10  1  1  0  3  2  0  0  4  2]\n",
      "[2 0 3 3 1 0 2 0 1 3 8 1 4 2 0 1]\n",
      "[ 0  2  1  1  1  1  3  9  0  2 11  0  0  0  6  1]\n",
      "[ 2  7  2 10  5  3  2  8  0  0  8 10  7  0  0  0]\n",
      "[ 0  2  7  1  9  3  8  0  1  0 10  2  2  1  1  2]\n",
      "[ 2  1  7  0  6  6  4  2  3  2  7 11  0  6  5  3]\n",
      "[ 0  4  7 10 10  4  5  2  6  0  0  1  7  3  3  2]\n",
      "[ 3  3  2  3  1  0 12  0  3  0  2  1  5 10  5  1]\n",
      "[1 0 4 2 1 0 0 0 9 2 1 0 5 9 8 1]\n",
      "[12  1  1  7 11  0  7 11  5  1  0  3  0  3  6  1]\n",
      "[11  2  3  0  2  0  2  1  8  0  5  2  6  0  0 10]\n",
      "[ 2  4  2  8  0  8  0  5  2  7  2 10 10  4 10  3]\n",
      "[1 1 2 4 9 0 0 0 5 1 0 7 6 0 1 1]\n",
      "[5 9 6 0 1 4 3 0 1 3 0 2 1 1 2 2]\n",
      "[ 6  0  1  2  0  1  1  6  2  0 13  3  4  2  1  3]\n",
      "[0 1 0 6 5 5 3 3 5 0 2 6 0 3 1 0]\n",
      "[ 3  4  1  8  7  0  5  4  3  8  7  3  0  0  0 10]\n",
      "[2 5 9 2 2 6 9 2 2 5 0 1 7 7 1 0]\n",
      "[ 0  0  4  8 10  1  2  4  1  8  5  0  0  0  3  7]\n",
      "[2 2 1 4 0 2 2 7 0 5 1 0 0 3 1 3]\n",
      "[ 4  2  1  0  1  3  3  1  5  9  2  2 11  3  0  5]\n",
      "[ 1  2  4  9  2  0  6 11  1  0  0  7  4  4  3  0]\n",
      "[6 2 4 3 3 1 3 3 8 3 0 3 2 6 5 2]\n",
      "[1 3 9 3 8 1 8 1 0 9 2 9 5 1 3 6]\n",
      "[ 0  0  0 11  0  1  2  2  2  4  2  6  4  5  3  5]\n",
      "[ 0  5  8  0  2  6 12  0  8  3  0  1  2  2  1  2]\n",
      "[ 1  1  0  2  1  3  2  2  1  2  3  0 13  2  2  2]\n",
      "[ 3  2  1  6 10 11  5  8  3  6  1  0  6  9  0  1]\n",
      "[1 5 3 7 7 0 5 3 2 3 3 2 9 0 1 2]\n",
      "[ 2  0  0  2  7  1  6  2  2  6  2  2 11  8  1  8]\n",
      "[1 0 7 4 2 8 7 6 0 0 1 2 2 2 7 4]\n",
      "[6 7 5 0 1 2 2 1 1 1 1 1 6 3 0 0]\n",
      "[1 0 1 1 9 3 0 2 4 6 0 0 3 1 1 2]\n",
      "[ 0  0  2  2  2  1  0  3  0  0  0  9  3 10 11  5]\n",
      "[3 3 0 6 0 5 2 0 3 1 2 5 2 8 6 1]\n",
      "[ 6  6  2  5  6  6  0 10  9  6  3  5 10 10  8  3]\n",
      "[ 8  6  4  0  2  0  0  4  0  2  7  3  7  7 12  6]\n",
      "[0 1 1 1 6 0 7 0 3 4 5 0 2 2 1 2]\n",
      "[0 0 8 0 2 4 1 2 1 1 1 2 3 2 8 3]\n",
      "[ 0  4  6  3 13  9  1  6  7  0  1  6  3  1  1  0]\n",
      "[0 0 6 3 3 1 3 1 2 8 2 3 9 1 1 2]\n",
      "[1 8 1 0 0 0 7 3 1 4 2 2 4 7 1 1]\n",
      "[12  2  2 11  1  3  5 12  0  0  5  2  1  7  0  5]\n",
      "[ 0  1 10  7  1  0  1  9  3  0  0  0  3  0  4  3]\n",
      "[ 2 10  4  7  4  2  0  5  1  0  6  5  3  0  0  0]\n",
      "[1 2 0 7 3 4 0 8 1 4 2 2 3 5 0 2]\n",
      "[ 6  6  3  2  3  5  0  1  4  5  0 12  4  0  0  1]\n",
      "[0 5 6 4 1 3 1 1 2 0 2 1 8 4 2 9]\n",
      "[ 0  0  0  0  5  4  5  0  6  2 12  1 10  1  0  3]\n",
      "[ 5  0  0  6  5  4  1  1  7  4  5  8 12  4  2  0]\n",
      "[4 3 1 1 0 1 1 1 2 2 0 9 3 4 0 6]\n",
      "[0 0 1 1 0 8 5 0 1 0 3 1 2 0 1 2]\n",
      "[4 2 0 2 1 0 0 1 2 0 4 2 9 0 0 9]\n",
      "[2 1 4 0 1 8 2 3 0 0 0 9 0 6 5 2]\n",
      "[0 0 0 1 3 1 0 0 0 2 4 5 2 3 0 8]\n",
      "[ 9  1  8  4  3  0  3  2  6  0  2  9 10 10  1  2]\n",
      "[0 5 3 1 3 0 4 2 7 3 0 0 8 3 2 2]\n",
      "[ 2 10  3  0  1  3  0  6  8  0  7  0  0  2  8  6]\n",
      "[ 3  1  0  3  4  4 10  1  3  2  4  2  2  6  8  5]\n",
      "[ 5  2  3  2  1  0  1  3  0  2  2  4  3  0  1 10]\n",
      "[4 2 0 3 0 0 0 5 2 0 3 3 1 2 1 1]\n",
      "[ 6  2  8  4  0  0  2  0 10  0  7  1  0  0  3  6]\n",
      "[8 0 7 0 2 1 0 1 6 1 2 3 2 5 2 5]\n",
      "[ 7  4  2  0  4  0  1  0  2  1 10  0  4  3  0  0]\n",
      "[3 0 2 1 2 7 7 4 4 3 3 3 1 0 6 2]\n",
      "[ 9  1  0  9  4  1  0  0  8  2  0 10  3  5  1  1]\n",
      "[2 0 0 3 3 3 4 1 0 0 3 0 1 0 0 1]\n",
      "[ 3  8  1  2  3  1  1  1  0  1  0  7  4  0 11  2]\n",
      "[7 1 3 0 1 1 1 5 0 3 1 8 0 2 0 0]\n",
      "[ 3  1  6  1  2  1  5  1  1  9  9 10  2  8  2 10]\n",
      "[4 0 6 2 2 0 0 1 0 3 0 6 3 2 1 8]\n",
      "[ 9  0  7  2  1  2  2  4  7  0  0  0 13  0  5  0]\n",
      "[7 1 4 2 2 2 1 3 2 6 3 3 1 3 1 1]\n",
      "[ 3  1  5  5  6  6  2  0  6  1  4  3  0  4 10  2]\n",
      "[0 3 9 0 2 5 4 6 2 6 2 1 5 0 2 5]\n",
      "[ 2 13  2  4  2  5  8  3  6  3  2  9  0  6  6  0]\n",
      "[1 2 0 0 2 3 1 3 6 3 1 2 3 3 0 6]\n",
      "[ 2 10  1  4  1  0  1  8  3  2  1  1  0  1  0  2]\n",
      "[ 4  6  3  1  6 10  0  1  1  4  6  2  1  4  4  5]\n",
      "[8 3 3 8 3 2 6 3 6 2 7 6 1 8 3 2]\n",
      "[ 9  2  0  0  2  9  0  2  8 12  1  6  1  3  2  1]\n",
      "[ 1  0  4  2 11  0 11  1  7  3  0  8  2  0  1  1]\n",
      "[1 3 1 1 2 0 1 0 8 8 7 3 1 1 4 0]\n",
      "[ 0  2  0 11  5  0  0  5  0  3  3  4  1  5  4  1]\n",
      "[ 6  3  4  9  1  4  2  2  5  0  6  5  4  3  2 10]\n",
      "[0 8 0 4 1 3 1 7 8 2 1 1 1 1 2 1]\n",
      "[0 9 0 2 0 0 0 3 0 0 5 5 0 6 0 0]\n",
      "[ 8  3  1  0  6  2  2  2  1  6  0  4  0 11  0  1]\n",
      "[ 7  1  0  5  4  2  5  2  9  2  4  5 10  2 10  3]\n",
      "[ 4  4  7  2  8  3  0  3  0 11  0  1  1  1  4  0]\n",
      "[6 2 2 0 2 2 1 2 4 2 1 0 9 2 0 3]\n",
      "[1 7 3 2 2 2 1 7 6 1 7 6 4 6 1 0]\n",
      "[10  2  6  7  3  4  0  5  1  8  7  1 10  3  2  4]\n",
      "[ 8  2  0  3  0  2  1  1  4 10  6  3  5  3  3  2]\n",
      "[0 7 3 5 2 1 4 5 5 3 2 0 8 9 0 1]\n",
      "[ 3  5  9  2 12  3  0  3  3  1  2  5  3  5  0  3]\n",
      "[ 2  9  0 12  5  5  1  4  2  4  8  1  0  0  4  3]\n",
      "[ 1  5  8  1  3  3 10  1  0  3  0  2  0  1  5  2]\n",
      "[0 4 7 2 7 1 0 3 0 4 7 0 0 1 0 9]\n",
      "[ 6  5  1  2  1  2  0  2  0  1  1 10 12  1  4  6]\n",
      "[ 5  0  3 12  0  3  3  2  8  0  1  1  2  3 11  1]\n",
      "[2 1 4 0 6 6 0 1 8 0 6 0 0 1 3 7]\n",
      "[5 3 0 1 0 5 2 2 6 1 2 5 2 1 0 4]\n",
      "[7 3 0 0 2 0 7 2 7 0 3 2 1 0 3 0]\n",
      "[9 0 7 6 1 9 2 1 3 0 5 8 4 4 0 2]\n",
      "[0 2 3 0 0 2 5 8 0 2 1 5 1 3 1 0]\n",
      "[4 3 3 0 9 6 0 2 0 0 2 0 2 0 9 1]\n",
      "[ 2  6  0  2  1  3 11  8  3  3  7  4  8  6  2  1]\n",
      "[ 6  0  6  0  1 11  8  0  1  4  2  7  0  1  2  1]\n",
      "[1 4 0 1 0 0 4 2 0 2 2 1 5 1 0 0]\n",
      "[5 9 0 2 3 2 4 4 8 2 2 0 0 1 3 3]\n",
      "[7 3 5 7 1 6 5 2 3 1 6 0 2 3 1 5]\n",
      "[ 3  8 11  2  2  1  8  0  0  0  1  1  2  3  2 10]\n",
      "[ 1  1  0  0  0  0  2  0  0  3 10  2  2  0  3  2]\n",
      "[1 0 3 1 3 4 1 2 0 3 1 3 5 3 2 2]\n",
      "[ 0 10  1  2  2  1  1  1  3  2  6  1  0  4  7 11]\n",
      "[ 1  1  1 11  7  2  0  1  5  5  3  8  8 10  1  3]\n",
      "[ 4  6  4  2  1  0  7 10  6  1 10  4  1  0  8  2]\n",
      "[2 6 1 3 6 0 2 3 0 0 1 8 0 0 8 7]\n",
      "[ 1  2  0 10  7  0  3  1  7  1 10  2  1  5  3  4]\n",
      "[ 0  2  0  4  5 10  9  0  0  1 11  0  2  3  4  3]\n",
      "[ 3 11  1  2  2  9  0  8  1  4  0  3  0  3  4  6]\n",
      "[ 1  0  0  0  3  0 10  2  4  1  8  4  4  2  1  5]\n",
      "[1 1 2 4 2 1 1 1 3 0 2 9 6 3 0 0]\n",
      "[ 0  9  0  6  0  2  1 10  0  4  0  3  8  6  1  9]\n",
      "[ 1  1 11  4  0  2  1  0  5  6  3  4  2  2  1 11]\n",
      "[ 6  1  1  7  5  4  1  2  1  1  4  1  3  0 10  5]\n",
      "[ 1  1  9  7  7  1  0  7  0  3  5  4  6  1 10  3]\n",
      "[ 0  8  1  0  3  8  6  0  2  0 13  1  1  4  0  5]\n",
      "[ 5  1  0  2  1  1  0  0  0  5  0  5 10  3  2  0]\n",
      "[ 0  3  1  2  1 10  3  0  1  0  0  4 11  5  2  5]\n",
      "[ 1  1 13  1  2  0  1  4  8  0  0  4  0  1  2  4]\n",
      "[ 0  5  1  3  1  5  3  4 11  0  5 10  2  0  2  5]\n",
      "[1 1 4 4 2 0 0 4 3 3 1 4 4 3 6 0]\n",
      "[ 1  1 12  0  1  0  0  1  0  1  2  0  1  2  8  2]\n",
      "[ 3  7  0  3 11  3  6  9  5  3  1  0  1  0  1  4]\n",
      "[ 6  4  1  5  2  6  1  4  5  5  0 11  7  0  5  2]\n",
      "[ 0  6  0  0  0  1  2  5  4  5 11  8  8  3  0  0]\n",
      "[ 1  0  4  6  1  1  2  2  0 10  8  2  2  9  0  2]\n",
      "[ 0  0  1  3  0 10  5  4  3  4  7  1  6  5  1  2]\n",
      "[0 0 3 2 3 3 8 3 1 3 2 3 2 2 0 2]\n",
      "[12  3  0  3  2  2  4  2  3  0  5  5  3  3  3  2]\n",
      "[8 7 3 7 1 7 2 2 6 0 2 7 1 5 4 5]\n",
      "[ 1  9  1  2  2  2  2  2  2  8  2  1  1  1  3 11]\n",
      "[ 1  3  2  4  0  2  1  1  7  5  9  3  3  1 11  3]\n",
      "[ 0  3  0  5  5  9 10  1  1  5  1  4  0  3  0  8]\n",
      "[ 4  1  4  0  0  1  3  1 10  8  8  1  2  1  7  3]\n",
      "[ 2  1  3  9  2  2  3  7  0  0  5  2  1  0  5 12]\n",
      "[3 2 3 3 1 0 6 0 2 3 1 1 2 2 7 2]\n",
      "[ 7  2  0  1  4  0  0  0  0  4  8 12  2  2  0  3]\n",
      "[8 1 0 9 8 3 3 1 0 1 3 6 0 2 1 5]\n",
      "[ 2  2  3  1  6  1 11  1 11  0  0  1  3  0  4  6]\n",
      "[1 3 0 1 0 0 1 2 4 8 4 4 1 9 0 8]\n",
      "[6 5 6 5 8 2 5 5 6 3 8 1 6 1 9 3]\n",
      "[0 0 5 0 2 2 1 7 2 1 8 2 5 4 8 0]\n",
      "[11  7  3  3  5  4  9  1  5  1  3  0  4  5  2  2]\n",
      "[ 1  9  0  1  3  3  1  0 12  0  5  2  1  0  8  2]\n",
      "[ 0  4  2  5  3  4 13  1  0  1  5  0  4  5  6  0]\n",
      "[4 0 0 2 0 4 5 4 8 8 1 7 0 6 2 0]\n",
      "[6 0 0 1 3 2 1 3 1 2 3 5 2 4 5 5]\n",
      "[1 7 1 1 3 3 2 1 2 0 1 3 1 0 4 0]\n",
      "[ 3  5  9  3  0  8  1  2  0  4  1  0  0 10  2  3]\n",
      "[1 0 4 1 0 4 2 2 3 7 0 0 5 8 0 1]\n",
      "[ 0 10  1  0  2  1  7  9 10  1  1  1  7  2  5  1]\n",
      "[ 9  7  2  1  7  3  0  0  2  0  6  5  1  1 12  5]\n",
      "[2 4 2 2 2 3 1 4 2 9 1 1 4 4 5 4]\n",
      "[7 3 5 3 3 0 1 8 1 0 8 5 4 5 2 5]\n",
      "[ 1  2  1  5  2  6  4 10  2  1  0  4  5  3 10  1]\n",
      "[ 2  3 11  1  1  9  2  4  2  2  4  0  7  1  3  2]\n",
      "[10  2  5  1  4  3  1  5  3  1  4  4  4 10  5  0]\n",
      "[ 4  1  6 12  1  7 10  4  2  1  3  0  3  2  1 10]\n",
      "[8 1 6 2 0 3 0 3 3 4 9 1 1 0 3 6]\n",
      "[1 7 0 1 1 4 8 8 3 4 2 0 0 0 3 4]\n",
      "[ 0  2  3  3 11  3 11  3  4  0  9  2  8  5  0 12]\n",
      "[ 3  1  5  7  0  3  3  5  1 10  1  0  7  2  1  4]\n",
      "[3 7 3 7 2 3 7 4 7 4 0 0 3 3 1 7]\n",
      "[ 3 11  3  1  0 10  6  2  4  0  2  6  2  8  2  1]\n",
      "[ 6  2 10  2  9  2  0  0  2 11  1  1  3  1 10  1]\n",
      "[0 0 2 2 1 3 9 1 4 7 3 6 2 2 2 5]\n",
      "[ 6  2  3 10  9  2  4  1  1 11  1  1  6  5  5  0]\n",
      "[0 2 4 0 0 0 1 2 1 5 1 1 2 3 0 1]\n",
      "[6 1 4 2 1 1 2 7 5 0 0 7 0 4 1 5]\n",
      "[ 6  4  5  4  1 10  8  2  0  1  2  1  2  2  0  2]\n",
      "[ 7  0 10  2  3  2  1  3  1  0  0  2 12  3  7  0]\n",
      "[ 8  1  3  1  0  2  7  1  2  7  4 10  2  1  1  0]\n",
      "[2 4 0 3 5 0 1 1 1 5 0 9 0 2 0 1]\n",
      "[ 1  1  9  1  5  8  0  2  9  1 12  1  3  3  0  0]\n",
      "[ 1  4  1  1  0  2  1  2  2  0  1  4 10  0  8  4]\n",
      "[ 7  0  1  4  3  5 10  5  2  2  2  0  3  3  4  2]\n",
      "[ 7  4  0  2  3  2 11  3  3  0  0  8  2  3 10  8]\n",
      "[0 7 2 2 2 1 2 2 0 8 8 6 4 7 1 5]\n",
      "[ 0  2 11  2  0  2  2  0  6  3  0  2  3  0  7  0]\n",
      "[2 3 1 4 4 0 0 2 2 0 3 3 0 1 1 1]\n",
      "[5 0 6 2 1 6 1 1 8 3 8 2 2 6 2 0]\n",
      "[1 2 8 8 7 0 1 7 2 2 5 2 3 0 4 0]\n",
      "[0 1 2 1 1 6 5 4 0 5 2 4 1 2 0 6]\n",
      "[0 0 5 6 2 5 2 1 2 0 1 1 3 1 0 0]\n",
      "[1 0 2 7 3 6 0 3 1 8 5 5 7 5 2 3]\n",
      "[ 1  0  4  0 12  0  7  2  0  1  1  5  0  1  0  9]\n",
      "[ 9  3  3  7  2  1  0  9  1  4  7  0  1  7  2 13]\n",
      "[0 4 4 0 1 9 5 4 9 5 6 0 5 7 4 1]\n",
      "[1 0 1 0 1 1 3 0 2 2 1 5 7 1 2 0]\n",
      "[ 1  1  0  1  5  0  2  1 12  4  2  9  2  3  0  6]\n",
      "[0 0 0 2 2 4 0 2 1 6 2 0 1 0 4 1]\n",
      "[8 0 6 9 1 2 4 5 1 9 9 9 2 5 0 1]\n",
      "[ 3  0  8  4  3  2  0  8  0  4  8  3  2 11  2  0]\n",
      "[1 8 0 4 6 6 9 0 3 5 8 3 2 2 2 0]\n",
      "[ 3  0  8  0 10  0  5  0  2  0  1  0  2  7  2  1]\n",
      "[ 7  9  2  2  0  0  0  1  0  3  1  4  4 10  3  5]\n",
      "[1 2 7 0 5 1 1 1 0 2 6 2 2 3 8 1]\n",
      "[ 0 11  1  4  3  9  8  4 12  2  2  4  8  2  1  1]\n",
      "[ 1 12  2  6  2  8  9  2  0  0  9  0  1  9  6  2]\n",
      "[ 3  3  1  4  5  0 11  2  4  1  5  2  1  2  4  0]\n",
      "[ 3  5 10  8  0  2  0  5  2  0  1  4  7  8  3  0]\n",
      "[ 7  6  8  1  0  0  2  0  0  0  4  2  0  1  2 11]\n",
      "[ 7  3  3 10  0  2  0  9  9  9  1  1  0  3  1  3]\n",
      "[ 8  0  1  3  2  0  0  0  0 11  0  3  7  2  0  9]\n",
      "[1 1 2 1 1 4 3 1 0 4 9 0 1 2 0 5]\n",
      "[ 3  1  1  1  4  3  2  6  5 11  2  4  5  1  0  2]\n",
      "[ 9  1  3  3  5  0  1  3  0  1  0  2  1 12  0  2]\n",
      "[1 3 3 0 0 5 2 4 1 0 1 3 0 5 6 6]\n",
      "[10  5  4  1  3  2  5  2  3  8  2  0  0  2  2  9]\n",
      "[ 2  1  4  6  7 10  0  0  5  0  0  3  1  1  0  7]\n",
      "[ 3  3  3  3  7  3  5  0 10  1  1  0  1 10  3  0]\n",
      "[ 1  0  0  2  3  6  5 10  3  0  8  3  3  4  5  7]\n",
      "[1 1 2 5 4 3 2 2 1 3 4 8 3 4 3 1]\n",
      "[8 0 1 0 4 8 0 3 1 7 0 7 3 1 1 3]\n",
      "[3 3 0 2 1 2 6 8 3 4 6 7 0 2 9 5]\n",
      "[ 2  7  2  4  8  0  4  2  5  5 12  0  0  7  0  4]\n",
      "[1 5 5 3 3 0 4 6 2 7 0 1 4 1 3 4]\n",
      "[5 0 8 0 2 3 0 0 3 4 7 0 4 0 2 7]\n",
      "[7 2 1 6 3 4 4 0 0 3 0 9 3 3 4 5]\n",
      "[1 9 0 1 7 1 7 3 6 6 0 6 3 9 6 7]\n",
      "[ 8  0  8  4  2  1  1  5  3 12  5  5  1  1  2  6]\n",
      "[ 2  0  1  4  1  3  0  3  4  0  8  3  5 11  1  1]\n",
      "[1 1 1 2 1 0 0 2 1 1 3 1 5 0 0 2]\n",
      "[0 1 1 2 0 4 0 3 2 6 2 8 7 2 3 7]\n",
      "[9 3 5 4 1 1 6 3 4 1 2 0 3 0 5 1]\n",
      "[ 0  1 11  0  2 10  1  2  3  9  1  4  1  3  2  3]\n",
      "[ 5  6  2  0 10  1  4  8 11  2  0  3  1  6  0  7]\n",
      "[ 7  0  0  0  0 10  4  0  1  3  0  6  3  0  4  0]\n",
      "[10  0  1 11  0  7  3  9  3  6  0  0  9  2  0  0]\n",
      "[7 0 0 5 2 0 4 4 0 3 2 1 5 1 2 1]\n",
      "[0 0 1 1 0 0 1 1 4 6 8 0 2 0 6 8]\n",
      "[ 2 10  0  1  2  1  0  1  0  1  2  7  3  3  6  0]\n",
      "[5 0 0 6 3 2 2 9 8 7 3 0 4 3 4 1]\n",
      "[ 1  7  7  6  5  2  2  1  4  0  6  8  1  0  0 11]\n",
      "[2 3 0 4 7 3 8 1 4 4 6 7 4 1 9 7]\n",
      "[ 0  1  1  1  5  3  2  0  7  1  8 10  0  2  3  0]\n",
      "[ 1 11  0  6  7  1  2  2  4  1  1 10  0  2  2  7]\n",
      "[ 2  6  2  7  2  2 10  0  5  0  4  8  0  4  3  2]\n",
      "[1 2 2 1 0 2 4 0 0 3 3 1 1 0 1 1]\n",
      "[ 4  3  2  3  9 13 10  0  1  2  7  2  1  1  2  1]\n",
      "[ 0  4  3  0  6 10  0  1  5  0 11 11  0  0  2  4]\n",
      "[2 1 3 0 0 4 1 3 0 0 5 1 0 5 0 7]\n",
      "[4 1 2 4 0 3 4 4 2 1 2 4 3 7 0 0]\n",
      "[3 1 2 5 3 2 1 7 1 1 4 3 9 1 4 0]\n",
      "[3 3 9 1 8 5 5 0 4 6 2 0 7 4 4 1]\n",
      "[0 0 1 1 0 8 0 9 2 7 1 0 0 6 0 0]\n",
      "[3 0 4 2 6 2 1 0 4 6 1 1 1 0 1 0]\n",
      "[3 2 4 2 2 7 1 5 3 5 2 2 2 7 0 0]\n",
      "[4 4 3 3 4 5 4 0 0 9 1 0 3 4 6 1]\n",
      "[6 1 0 0 3 8 2 0 0 1 4 2 1 0 2 3]\n",
      "[2 4 1 3 8 4 0 1 7 2 8 2 0 3 1 4]\n",
      "[1 3 9 9 4 6 3 7 2 0 4 2 4 2 3 5]\n",
      "[5 4 2 4 1 3 9 2 1 9 5 4 7 6 2 6]\n",
      "[ 1  2  5  0  0  7 12  3  1  2  6  3  7  1  0  3]\n",
      "[0 9 2 0 1 0 2 1 6 4 1 6 2 0 1 2]\n",
      "[ 0  3  9  1 13  2  5  4  1  0  1  0  2  7  1  3]\n",
      "[1 1 6 9 5 4 4 7 4 1 1 2 0 2 0 5]\n",
      "[9 0 3 9 9 0 0 1 0 7 5 8 2 2 1 9]\n",
      "[ 2  3  0  3  4  6  1 10  3 11  6  3  1  3  3 10]\n",
      "[1 6 1 0 8 7 0 0 3 5 4 6 9 3 1 9]\n",
      "[7 2 3 6 9 1 3 5 4 1 0 2 3 2 6 2]\n",
      "[ 4  5 10  0  4  4  1  3 10  0  0 10  0  0  3 11]\n",
      "[ 2  2  2  5  1  1  2  0 11  3  0  2  0  2  0  4]\n",
      "[8 0 3 2 2 2 7 1 5 7 8 9 0 0 2 3]\n",
      "[0 4 9 1 0 2 3 0 0 0 0 7 0 2 3 0]\n",
      "[ 3  2  0  1  0  0  0  4  2  6  2  5  1  1  0 10]\n",
      "[6 0 0 0 0 7 0 1 0 1 4 1 3 2 1 3]\n",
      "[11  2  7  2 10  0  4  1  7  1  4  2  0  2  4  2]\n",
      "[ 1  4 11  1  2  9  2  0  4  3  4  0  7  0  5  4]\n",
      "[10  0  5  3  8  1  0  1  0  7  5  1  1  9  0  1]\n",
      "[1 8 1 0 9 5 3 9 2 4 8 3 7 0 0 3]\n",
      "[ 4  1  1  3  9  0  2  6  3 10  0  0  3  8  3  1]\n",
      "[ 1  0  2  7  4  4  0 13  0  6  1  3  0  4  1  9]\n",
      "[ 0  0  0 10  0  3  1  7  0  4  1  5  2  2  0  2]\n",
      "[ 5  4 12  1  5  2  0 10  6  0  3  7  3  1  3  4]\n",
      "[ 0  2  3 11  2 13  1  4  7  5  2  0  2  4  3  0]\n",
      "[2 1 1 5 5 1 1 3 3 1 8 6 8 8 0 5]\n",
      "[ 0  0  7  1  1  2  7 11  1  8 12  2  0  3  1  0]\n",
      "[ 2  3  1  0  3  6  1  2  4  5  0  8  0  2  1 10]\n",
      "[10  0  1  0  5  0  3  6  2  6  0  3  1  2  1  6]\n",
      "[2 1 7 1 2 0 1 9 0 2 5 1 4 5 2 2]\n",
      "[ 5  0  0  5  1  1  6  3  1  8  3  5  8  3 10  1]\n",
      "[ 2  2  0  3 11  2  3  7  1  6  3  7  1  0  2  0]\n",
      "[ 1  2  6 11  2  9  2  2  5  7 10  0  1  0  1  0]\n",
      "[11  0  1  9  3  4  3  8  1  5  5  5  4  8  6  1]\n",
      "[0 4 1 3 7 4 3 1 0 0 2 7 2 1 0 5]\n",
      "[2 1 3 1 0 0 0 3 0 2 2 0 0 2 0 2]\n",
      "[ 4  1  1 10  0  1  3  6 12  3  3  0  2  1  0  7]\n",
      "[3 3 0 1 4 9 7 0 4 7 2 1 3 6 0 1]\n",
      "[2 2 1 0 1 0 6 0 7 1 1 0 2 4 1 5]\n",
      "[ 1  2  2  6 10  4  2  6  1  0  0  1  1  9  4  0]\n",
      "[ 0  1  5  3 10  4  6  1  6  2  1  3  9  2  0  8]\n",
      "[0 0 0 2 8 1 0 0 2 0 1 4 2 0 3 2]\n",
      "[ 6  0  2 11  3  0  7  0  3  4  0  0  8  0  5  0]\n",
      "[10  4  4  2  3  6  9  2  8  0  3  1  3  5  0  3]\n",
      "[ 6  2  9  1 12  7  3  3  1  5  2  1  1  2  0  3]\n",
      "[0 1 1 3 1 0 0 2 1 2 0 2 2 2 0 0]\n",
      "[ 0  5  2  0  0  6  0  1  1  0  1  1 10  1  5  5]\n",
      "[ 1  0  1  1  0  2  1  6  0  0  1  0 12 10  1  2]\n",
      "[ 3  3  3  2  2  3  9  3  7 10  1  0  3  2  8  2]\n",
      "[ 3  0  7  3  1  2  0  2  1 10  1  1  2  1  1  4]\n",
      "[10  1  0  0  0  7  4  3  0  9  0  0  1  1 12  6]\n",
      "[ 0  5  0  8  1  0  2  0  0  3  4  7  1 10  5  0]\n",
      "[1 0 3 0 0 0 2 5 2 0 3 8 2 2 2 3]\n",
      "[ 2  2  7  5  0 10  0  2  0  8  1  9  2  1  1  1]\n",
      "[ 2  2  0  4  5  4  8  2  2  1  0  2  0  0  0 10]\n",
      "[ 0  3  2  2  3  3 11  0  6  1  2  3  5  1  3  0]\n",
      "[1 2 7 4 2 0 7 3 4 5 0 2 1 3 1 2]\n",
      "[3 2 2 1 1 0 4 7 0 1 0 6 8 3 5 1]\n",
      "[ 0  0  7 10  0  3  1  5  0  2  0  8 11  6  5  1]\n",
      "[ 4  6  0  4  2  4  5  0  5  2 11  0  2 10  1 10]\n",
      "[ 6  8  1  1  7  0  1  4 11  7  3  0  1  1  7  0]\n",
      "[ 1  1  3  0  0  1  2  2  2  4  2  3  6  0  2 10]\n",
      "[ 7  4  2  1  3  0  3  7  1  5  2  3  7  9  4 10]\n",
      "[1 7 3 4 5 1 0 3 0 1 3 1 2 2 0 4]\n",
      "[ 0  0  3  1  5 12  0  3  0 10 11  5  2  2  1  1]\n",
      "[1 0 1 0 0 3 1 1 3 0 3 6 1 0 3 2]\n",
      "[5 2 6 1 2 3 7 1 8 7 3 4 2 3 2 2]\n",
      "[ 0 12  2  0  1  3  0  1  3  1  3  5  2  1  0  0]\n",
      "[9 0 2 1 1 1 1 4 0 0 5 0 7 3 0 2]\n",
      "[12  9  4  2  0  7 10  1  9 10  1  3  1  3  2  7]\n",
      "[ 1  3  1  4  4  3  1  0  1  1  6  0  0  2  0 10]\n",
      "[0 4 4 2 1 2 2 6 2 1 0 0 0 2 4 4]\n",
      "[ 0  1  0 11  5  2  9  1  5  2  6  1  0  0  3  0]\n",
      "[ 2  6  5  0  1  2  9  5  1  5 12 11  4  2  8  1]\n",
      "[3 0 2 0 1 4 0 9 1 2 3 3 2 1 3 1]\n",
      "[ 4  1  0  6  3 10  2  5  0  1  2  2  8  4  0  6]\n",
      "[ 9  2  0  3 10  1  0  0  6  2  1  0  0 10  2  1]\n",
      "[ 4  1 11  1  4  1  7  1  2  1  6  1  2  3  3  1]\n",
      "[1 2 1 0 2 0 3 9 0 2 2 1 2 0 4 0]\n",
      "[ 1  6  8  2  5  2  8  7  9  6  1  2 12  1  5  1]\n",
      "[ 5  1  2 11  6  8  1  3  6  2  2  1  2  8  0  9]\n",
      "[7 1 9 1 0 2 1 3 3 2 4 0 1 1 0 3]\n",
      "[ 4 10  4  3  2 11  4  5 13  2  0  3  6 13  5  8]\n",
      "[ 8 10  2  2  2  3  6  0  0  3  6  0  6  1  1  3]\n",
      "[ 0  3  7  2  3  2  0  8  1 11  6  2  1  3  4  2]\n",
      "[10  2  3  1  0  1  2  2  4  1  2  2  9  2  1  2]\n",
      "[3 9 8 9 0 1 4 0 0 1 0 2 7 1 1 6]\n",
      "[ 6  0  5  0  1  3  6  3  2  4  1  0  1 12  3  7]\n",
      "[2 0 9 5 3 2 2 5 4 0 0 0 2 3 0 2]\n",
      "[2 2 2 9 1 4 2 4 0 2 0 7 1 0 0 1]\n",
      "[0 0 5 2 5 0 8 5 0 2 0 6 7 0 5 7]\n",
      "[2 5 4 1 0 1 2 1 8 0 0 2 5 1 1 6]\n",
      "[ 6  2  1  5  3  4  3 10  1  2  2  2  0  2  1  6]\n",
      "[ 3  0  0  6  1  4  1  2  2  2 10  0  9  5  2  4]\n",
      "[0 1 4 5 0 3 8 0 3 0 7 3 3 4 0 9]\n",
      "[ 7  3  0  0  5 11  9  1  9  4  4  0  4  1  7  1]\n",
      "[10  3  2  4  8  2  2  1  8  2  5  1  0  1  0  3]\n",
      "[ 0  8  0  6  6  0  2  3  7  0  8 13  0  3  2  3]\n",
      "[0 0 5 0 1 6 1 0 2 2 3 3 2 5 2 4]\n",
      "[ 4  3  1  4  1  2  1  0  4  0  1  5  1  0 11  5]\n",
      "[ 1  5  0  0  0  4  8  5  9  0  4  6  8  0  3 12]\n",
      "[3 1 0 6 0 1 0 4 0 2 7 0 3 1 1 9]\n",
      "[3 1 2 2 4 3 0 0 5 3 2 4 1 0 7 1]\n",
      "[3 1 8 2 4 1 0 2 7 1 1 1 2 5 4 9]\n",
      "[ 1  2  8  1  0  3  6  3  5  1 11  4  0  0  4  9]\n",
      "[ 7  5  4  0  2  8  2  4  7  0  1  2  3  0 13  2]\n",
      "[ 0  5  0  1  1 10  5  0  3  0  4  2  4  0  0  0]\n",
      "[ 1  6  6  3  3  4 12  5  2  1  0  1  5  2  2  5]\n",
      "[ 0  0  2  5  8  4  0  8  2  3  1  7 12  2  1  7]\n",
      "[0 9 5 2 6 0 1 0 5 1 1 2 5 3 0 0]\n",
      "[2 0 5 1 5 0 2 3 3 5 1 2 0 1 1 0]\n",
      "[9 1 1 3 1 2 7 8 4 3 3 0 0 0 9 1]\n",
      "[ 1  1  5  4  9  3  3  9 10  1  5  1 11  3  0  0]\n",
      "[ 2  3  1  0  5  7  3  4  0  1  0  0 10  4  1  0]\n",
      "[ 5  4  2 10  7  2  0  0  1  6  1  4  0  0  2  2]\n",
      "[3 3 1 0 1 2 1 2 3 0 5 0 0 3 2 1]\n",
      "[ 4  8  1  1 11  1  9  1  0  5  2  1  1  0  1  4]\n",
      "[2 2 2 8 4 4 3 2 5 1 9 3 0 1 4 0]\n",
      "[3 9 2 2 1 0 3 3 1 0 0 4 3 8 2 0]\n",
      "[ 1  3  1  4  5  7  2  0 12  1  1  2  0  2  7  1]\n",
      "[ 5  0  6  0  5 11  2  0  0  0  0 10  3  7  0  0]\n",
      "[ 0  1  5  3  1  0  3  7 11  1  2  4  1  5  0 11]\n",
      "[11  1  4  2  3  2  4  1  1  0  8  0 11  8  2 13]\n",
      "[ 5 11  2  0  2  6  0  1  9  4  2  1  0  3  1  9]\n",
      "[ 8  2  3  0  1  7 11  1  0  0 10  0  1  0  1  5]\n",
      "[0 0 3 0 6 5 3 3 1 2 2 2 1 0 6 1]\n",
      "[ 1  7  3  1  2  3  5  1  1  6  2  7  0 10  2  1]\n",
      "[ 0  5  3  0  3 13  1  2  7  0  0  1  5  2  2  7]\n",
      "[0 6 8 2 4 1 1 8 8 7 1 2 0 0 0 2]\n",
      "[1 8 1 2 5 5 1 2 4 0 9 8 1 0 0 1]\n",
      "[5 0 0 1 2 4 1 1 0 7 1 2 2 3 1 8]\n",
      "[ 3  0  8 10  6  7  3  1  1  0  3  9  4  1  1  6]\n",
      "[ 3  0  4  1  4  2 10  0  5  2  0  0  3  2 10  5]\n",
      "[ 6  6  0  0  8  2  1  0  4 10  2  1  8  1  0  0]\n",
      "[ 8 12  0  3  1  0  1  2  0  7  3  1  6  1  4  1]\n",
      "[8 6 0 0 2 3 4 1 2 2 3 1 1 9 1 1]\n",
      "[10  5  3  0  1  0  4  6  0  1  5  3  2  0  2  1]\n",
      "[ 9  3  9  3  1  6  6 11  4  3  3  3  2  1  6  2]\n",
      "[ 7  2  2  1  2  0  6  0  5  0  2  4 12  5  7  3]\n",
      "[11  7  0  2  6  3  0  2  8  1  2  1 13  2  5  1]\n",
      "[1 2 4 2 6 5 2 2 2 2 1 7 3 0 2 3]\n",
      "[10  1  8  1  3  1  3  1 10  3  2  2  2  4  1  3]\n",
      "[ 6  0  1  1  0  5  1  0  5  3  2 10  6  1  1  4]\n",
      "[ 0  2  2  4  2 12  0  3  4  7  0  2  4  6  6  0]\n",
      "[ 7  1  4  1 12  4  3  0  4  2 10  5  1  0  0  8]\n",
      "[0 1 1 3 6 0 0 4 7 2 5 3 0 2 2 3]\n",
      "[3 0 0 3 5 3 3 3 0 2 8 0 2 0 8 2]\n",
      "[ 0  1  5  1  8  2  3  2  4  1  7 10  2  3  3  6]\n",
      "[10  7  0  6  3  7  3  2  7  6  4  0  1  0  0  2]\n",
      "[ 0  9  8  0  5  6  3  5  0 12  0  2  1  0  2  4]\n",
      "[1 0 2 9 2 0 0 3 3 2 3 1 2 2 3 1]\n",
      "[0 2 0 4 0 7 0 6 3 3 7 3 5 7 2 8]\n",
      "[ 4  0  0  0  0  3  5  8  3  2  2  5  3 11  0  1]\n",
      "[3 7 1 2 5 7 1 3 2 1 1 0 8 3 0 1]\n",
      "[ 3  2  1  5  2  1  5  5 12  3  1  0  0  2  6  7]\n",
      "[ 4  2  2  7  0  1  1  5  3  0 12  6  0  4  4  0]\n",
      "[ 0  9  1  1  4  8  1  0  9 11  0  1  0  1  5  1]\n",
      "[4 9 3 3 0 2 2 2 0 2 1 0 1 8 0 2]\n",
      "[ 4 13  4  4  2  2  1  6  1  0  1  4  1  0  2  4]\n",
      "[3 1 0 1 2 2 7 8 0 1 0 1 1 1 9 1]\n",
      "[1 2 0 0 0 0 0 3 1 3 0 4 3 3 2 3]\n",
      "[2 2 4 2 3 1 3 7 2 5 1 1 0 2 0 3]\n",
      "[ 4 10  5  4  3  0  3  0  2  3  3  2  4  1  4  8]\n",
      "[ 9  0  3  2  2  1  0  5  5  5 10  1  3  3  4  3]\n",
      "[9 0 3 3 9 0 1 5 5 9 2 1 2 7 3 2]\n",
      "[3 9 4 0 0 2 2 7 2 0 2 5 4 1 4 2]\n",
      "[0 1 3 0 1 7 0 2 4 1 1 1 3 2 4 8]\n",
      "[ 0  1 10  0  5  4  0  1  9  0  3  1  7  0  3  0]\n",
      "[3 2 0 1 1 1 4 1 3 0 1 0 3 1 9 2]\n",
      "[2 0 0 0 6 0 0 1 6 0 4 4 1 8 0 6]\n",
      "[9 1 7 5 1 0 1 4 1 1 2 1 1 4 4 0]\n",
      "[ 1  3  1  1  0  4  2  0  0 10  2  0  7  0  2  4]\n",
      "[3 0 3 4 1 3 2 7 2 2 6 2 3 1 2 2]\n",
      "[9 2 1 1 7 1 9 3 0 3 1 2 2 3 0 7]\n",
      "[ 2  4  9  2  0  0  2  1  3  0 10  0  4  5  7  0]\n",
      "[ 0 10  4  2  6 10  0  9  1  3  9  3  0  6  1  1]\n",
      "[2 2 5 1 4 7 1 8 1 4 4 3 2 3 1 2]\n",
      "[ 0  1  4  1  7  5 11  0  2  7 10  3  1  5  6  2]\n"
     ]
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[46], line 10\u001b[0m\n\u001b[1;32m      7\u001b[0m attention_mask \u001b[38;5;241m=\u001b[39m batch[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mattention_mask\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;241m.\u001b[39mto(device)\n\u001b[1;32m      9\u001b[0m  \u001b[38;5;66;03m# 前向传播获取预测结果\u001b[39;00m\n\u001b[0;32m---> 10\u001b[0m outputs \u001b[38;5;241m=\u001b[39m \u001b[43mmodel\u001b[49m\u001b[43m(\u001b[49m\u001b[43minput_ids\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43minput_ids\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtoken_type_ids\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtoken_type_ids\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mattention_mask\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m     11\u001b[0m logits \u001b[38;5;241m=\u001b[39m outputs\u001b[38;5;241m.\u001b[39mlogits\n\u001b[1;32m     12\u001b[0m preds \u001b[38;5;241m=\u001b[39m torch\u001b[38;5;241m.\u001b[39margmax(logits, dim\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m1\u001b[39m)\u001b[38;5;241m.\u001b[39mcpu()\u001b[38;5;241m.\u001b[39mnumpy()\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1739\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1737\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)  \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m   1738\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1739\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1750\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1745\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m   1746\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m   1747\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m   1748\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m   1749\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1750\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1752\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m   1753\u001b[0m called_always_called_hooks \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mset\u001b[39m()\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/transformers/models/bert/modeling_bert.py:1675\u001b[0m, in \u001b[0;36mBertForSequenceClassification.forward\u001b[0;34m(self, input_ids, attention_mask, token_type_ids, position_ids, head_mask, inputs_embeds, labels, output_attentions, output_hidden_states, return_dict)\u001b[0m\n\u001b[1;32m   1667\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124mr\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m   1668\u001b[0m \u001b[38;5;124;03mlabels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):\u001b[39;00m\n\u001b[1;32m   1669\u001b[0m \u001b[38;5;124;03m    Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,\u001b[39;00m\n\u001b[1;32m   1670\u001b[0m \u001b[38;5;124;03m    config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If\u001b[39;00m\n\u001b[1;32m   1671\u001b[0m \u001b[38;5;124;03m    `config.num_labels > 1` a classification loss is computed (Cross-Entropy).\u001b[39;00m\n\u001b[1;32m   1672\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m   1673\u001b[0m return_dict \u001b[38;5;241m=\u001b[39m return_dict \u001b[38;5;28;01mif\u001b[39;00m return_dict \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mconfig\u001b[38;5;241m.\u001b[39muse_return_dict\n\u001b[0;32m-> 1675\u001b[0m outputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mbert\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m   1676\u001b[0m \u001b[43m    \u001b[49m\u001b[43minput_ids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1677\u001b[0m \u001b[43m    \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mattention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1678\u001b[0m \u001b[43m    \u001b[49m\u001b[43mtoken_type_ids\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtoken_type_ids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1679\u001b[0m \u001b[43m    \u001b[49m\u001b[43mposition_ids\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mposition_ids\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1680\u001b[0m \u001b[43m    \u001b[49m\u001b[43mhead_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mhead_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1681\u001b[0m \u001b[43m    \u001b[49m\u001b[43minputs_embeds\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43minputs_embeds\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1682\u001b[0m \u001b[43m    \u001b[49m\u001b[43moutput_attentions\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moutput_attentions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1683\u001b[0m \u001b[43m    \u001b[49m\u001b[43moutput_hidden_states\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moutput_hidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1684\u001b[0m \u001b[43m    \u001b[49m\u001b[43mreturn_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mreturn_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1685\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1687\u001b[0m pooled_output \u001b[38;5;241m=\u001b[39m outputs[\u001b[38;5;241m1\u001b[39m]\n\u001b[1;32m   1689\u001b[0m pooled_output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdropout(pooled_output)\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1739\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1737\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)  \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m   1738\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1739\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1750\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1745\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m   1746\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m   1747\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m   1748\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m   1749\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1750\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1752\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m   1753\u001b[0m called_always_called_hooks \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mset\u001b[39m()\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/transformers/models/bert/modeling_bert.py:1144\u001b[0m, in \u001b[0;36mBertModel.forward\u001b[0;34m(self, input_ids, attention_mask, token_type_ids, position_ids, head_mask, inputs_embeds, encoder_hidden_states, encoder_attention_mask, past_key_values, use_cache, output_attentions, output_hidden_states, return_dict)\u001b[0m\n\u001b[1;32m   1137\u001b[0m \u001b[38;5;66;03m# Prepare head mask if needed\u001b[39;00m\n\u001b[1;32m   1138\u001b[0m \u001b[38;5;66;03m# 1.0 in head_mask indicate we keep the head\u001b[39;00m\n\u001b[1;32m   1139\u001b[0m \u001b[38;5;66;03m# attention_probs has shape bsz x n_heads x N x N\u001b[39;00m\n\u001b[1;32m   1140\u001b[0m \u001b[38;5;66;03m# input head_mask has shape [num_heads] or [num_hidden_layers x num_heads]\u001b[39;00m\n\u001b[1;32m   1141\u001b[0m \u001b[38;5;66;03m# and head_mask is converted to shape [num_hidden_layers x batch x num_heads x seq_length x seq_length]\u001b[39;00m\n\u001b[1;32m   1142\u001b[0m head_mask \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mget_head_mask(head_mask, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mconfig\u001b[38;5;241m.\u001b[39mnum_hidden_layers)\n\u001b[0;32m-> 1144\u001b[0m encoder_outputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mencoder\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m   1145\u001b[0m \u001b[43m    \u001b[49m\u001b[43membedding_output\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1146\u001b[0m \u001b[43m    \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mextended_attention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1147\u001b[0m \u001b[43m    \u001b[49m\u001b[43mhead_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mhead_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1148\u001b[0m \u001b[43m    \u001b[49m\u001b[43mencoder_hidden_states\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mencoder_hidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1149\u001b[0m \u001b[43m    \u001b[49m\u001b[43mencoder_attention_mask\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mencoder_extended_attention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1150\u001b[0m \u001b[43m    \u001b[49m\u001b[43mpast_key_values\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpast_key_values\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1151\u001b[0m \u001b[43m    \u001b[49m\u001b[43muse_cache\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43muse_cache\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1152\u001b[0m \u001b[43m    \u001b[49m\u001b[43moutput_attentions\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moutput_attentions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1153\u001b[0m \u001b[43m    \u001b[49m\u001b[43moutput_hidden_states\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moutput_hidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1154\u001b[0m \u001b[43m    \u001b[49m\u001b[43mreturn_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mreturn_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m   1155\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1156\u001b[0m sequence_output \u001b[38;5;241m=\u001b[39m encoder_outputs[\u001b[38;5;241m0\u001b[39m]\n\u001b[1;32m   1157\u001b[0m pooled_output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mpooler(sequence_output) \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mpooler \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1739\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1737\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)  \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m   1738\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1739\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1750\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1745\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m   1746\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m   1747\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m   1748\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m   1749\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1750\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1752\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m   1753\u001b[0m called_always_called_hooks \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mset\u001b[39m()\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/transformers/models/bert/modeling_bert.py:695\u001b[0m, in \u001b[0;36mBertEncoder.forward\u001b[0;34m(self, hidden_states, attention_mask, head_mask, encoder_hidden_states, encoder_attention_mask, past_key_values, use_cache, output_attentions, output_hidden_states, return_dict)\u001b[0m\n\u001b[1;32m    684\u001b[0m     layer_outputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_gradient_checkpointing_func(\n\u001b[1;32m    685\u001b[0m         layer_module\u001b[38;5;241m.\u001b[39m\u001b[38;5;21m__call__\u001b[39m,\n\u001b[1;32m    686\u001b[0m         hidden_states,\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m    692\u001b[0m         output_attentions,\n\u001b[1;32m    693\u001b[0m     )\n\u001b[1;32m    694\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 695\u001b[0m     layer_outputs \u001b[38;5;241m=\u001b[39m \u001b[43mlayer_module\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m    696\u001b[0m \u001b[43m        \u001b[49m\u001b[43mhidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    697\u001b[0m \u001b[43m        \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    698\u001b[0m \u001b[43m        \u001b[49m\u001b[43mlayer_head_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    699\u001b[0m \u001b[43m        \u001b[49m\u001b[43mencoder_hidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    700\u001b[0m \u001b[43m        \u001b[49m\u001b[43mencoder_attention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    701\u001b[0m \u001b[43m        \u001b[49m\u001b[43mpast_key_value\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    702\u001b[0m \u001b[43m        \u001b[49m\u001b[43moutput_attentions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    703\u001b[0m \u001b[43m    \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    705\u001b[0m hidden_states \u001b[38;5;241m=\u001b[39m layer_outputs[\u001b[38;5;241m0\u001b[39m]\n\u001b[1;32m    706\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m use_cache:\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1739\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1737\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)  \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m   1738\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1739\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1750\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1745\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m   1746\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m   1747\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m   1748\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m   1749\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1750\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1752\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m   1753\u001b[0m called_always_called_hooks \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mset\u001b[39m()\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/transformers/models/bert/modeling_bert.py:585\u001b[0m, in \u001b[0;36mBertLayer.forward\u001b[0;34m(self, hidden_states, attention_mask, head_mask, encoder_hidden_states, encoder_attention_mask, past_key_value, output_attentions)\u001b[0m\n\u001b[1;32m    573\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mforward\u001b[39m(\n\u001b[1;32m    574\u001b[0m     \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m    575\u001b[0m     hidden_states: torch\u001b[38;5;241m.\u001b[39mTensor,\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m    582\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Tuple[torch\u001b[38;5;241m.\u001b[39mTensor]:\n\u001b[1;32m    583\u001b[0m     \u001b[38;5;66;03m# decoder uni-directional self-attention cached key/values tuple is at positions 1,2\u001b[39;00m\n\u001b[1;32m    584\u001b[0m     self_attn_past_key_value \u001b[38;5;241m=\u001b[39m past_key_value[:\u001b[38;5;241m2\u001b[39m] \u001b[38;5;28;01mif\u001b[39;00m past_key_value \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m--> 585\u001b[0m     self_attention_outputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattention\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m    586\u001b[0m \u001b[43m        \u001b[49m\u001b[43mhidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    587\u001b[0m \u001b[43m        \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    588\u001b[0m \u001b[43m        \u001b[49m\u001b[43mhead_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    589\u001b[0m \u001b[43m        \u001b[49m\u001b[43moutput_attentions\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moutput_attentions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    590\u001b[0m \u001b[43m        \u001b[49m\u001b[43mpast_key_value\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mself_attn_past_key_value\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    591\u001b[0m \u001b[43m    \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    592\u001b[0m     attention_output \u001b[38;5;241m=\u001b[39m self_attention_outputs[\u001b[38;5;241m0\u001b[39m]\n\u001b[1;32m    594\u001b[0m     \u001b[38;5;66;03m# if decoder, the last output is tuple of self-attn cache\u001b[39;00m\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1739\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1737\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)  \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m   1738\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1739\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1750\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1745\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m   1746\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m   1747\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m   1748\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m   1749\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1750\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1752\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m   1753\u001b[0m called_always_called_hooks \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mset\u001b[39m()\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/transformers/models/bert/modeling_bert.py:515\u001b[0m, in \u001b[0;36mBertAttention.forward\u001b[0;34m(self, hidden_states, attention_mask, head_mask, encoder_hidden_states, encoder_attention_mask, past_key_value, output_attentions)\u001b[0m\n\u001b[1;32m    505\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mforward\u001b[39m(\n\u001b[1;32m    506\u001b[0m     \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m    507\u001b[0m     hidden_states: torch\u001b[38;5;241m.\u001b[39mTensor,\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m    513\u001b[0m     output_attentions: Optional[\u001b[38;5;28mbool\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[1;32m    514\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Tuple[torch\u001b[38;5;241m.\u001b[39mTensor]:\n\u001b[0;32m--> 515\u001b[0m     self_outputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mself\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m    516\u001b[0m \u001b[43m        \u001b[49m\u001b[43mhidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    517\u001b[0m \u001b[43m        \u001b[49m\u001b[43mattention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    518\u001b[0m \u001b[43m        \u001b[49m\u001b[43mhead_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    519\u001b[0m \u001b[43m        \u001b[49m\u001b[43mencoder_hidden_states\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    520\u001b[0m \u001b[43m        \u001b[49m\u001b[43mencoder_attention_mask\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    521\u001b[0m \u001b[43m        \u001b[49m\u001b[43mpast_key_value\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    522\u001b[0m \u001b[43m        \u001b[49m\u001b[43moutput_attentions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m    523\u001b[0m \u001b[43m    \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m    524\u001b[0m     attention_output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moutput(self_outputs[\u001b[38;5;241m0\u001b[39m], hidden_states)\n\u001b[1;32m    525\u001b[0m     outputs \u001b[38;5;241m=\u001b[39m (attention_output,) \u001b[38;5;241m+\u001b[39m self_outputs[\u001b[38;5;241m1\u001b[39m:]  \u001b[38;5;66;03m# add attentions if we output them\u001b[39;00m\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1739\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1737\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)  \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m   1738\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1739\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1750\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1745\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m   1746\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m   1747\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m   1748\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m   1749\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1750\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1752\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m   1753\u001b[0m called_always_called_hooks \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mset\u001b[39m()\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/transformers/models/bert/modeling_bert.py:409\u001b[0m, in \u001b[0;36mBertSdpaSelfAttention.forward\u001b[0;34m(self, hidden_states, attention_mask, head_mask, encoder_hidden_states, encoder_attention_mask, past_key_value, output_attentions)\u001b[0m\n\u001b[1;32m    407\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m    408\u001b[0m     key_layer \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtranspose_for_scores(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mkey(current_states))\n\u001b[0;32m--> 409\u001b[0m     value_layer \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtranspose_for_scores(\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalue\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcurrent_states\u001b[49m\u001b[43m)\u001b[49m)\n\u001b[1;32m    410\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m past_key_value \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m is_cross_attention:\n\u001b[1;32m    411\u001b[0m         key_layer \u001b[38;5;241m=\u001b[39m torch\u001b[38;5;241m.\u001b[39mcat([past_key_value[\u001b[38;5;241m0\u001b[39m], key_layer], dim\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m2\u001b[39m)\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1739\u001b[0m, in \u001b[0;36mModule._wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1737\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_compiled_call_impl(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)  \u001b[38;5;66;03m# type: ignore[misc]\u001b[39;00m\n\u001b[1;32m   1738\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1739\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/module.py:1750\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1745\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m   1746\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m   1747\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m   1748\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m   1749\u001b[0m         \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1750\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m   1752\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m   1753\u001b[0m called_always_called_hooks \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mset\u001b[39m()\n",
      "File \u001b[0;32m~/miniconda3/envs/countVctorRidgeclassification/lib/python3.10/site-packages/torch/nn/modules/linear.py:125\u001b[0m, in \u001b[0;36mLinear.forward\u001b[0;34m(self, input)\u001b[0m\n\u001b[1;32m    124\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mforward\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;28minput\u001b[39m: Tensor) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Tensor:\n\u001b[0;32m--> 125\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mF\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlinear\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43minput\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mweight\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mbias\u001b[49m\u001b[43m)\u001b[49m\n",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
     ]
    }
   ],
   "source": [
    "all_preds = []\n",
    "with torch.no_grad():\n",
    "    for batch in test_loader:\n",
    "        # print(batch)\n",
    "        input_ids = batch['input_ids'].to(device)\n",
    "        token_type_ids = batch['token_type_ids'].to(device)\n",
    "        attention_mask = batch['attention_mask'].to(device)\n",
    "    \n",
    "         # 前向传播获取预测结果\n",
    "        outputs = model(input_ids=input_ids, token_type_ids=token_type_ids, attention_mask=attention_mask)\n",
    "        logits = outputs.logits\n",
    "        preds = torch.argmax(logits, dim=1).cpu().numpy()\n",
    "        # print(preds)\n",
    "        all_preds.extend(preds)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "countVctorRidgeclassification",
   "language": "python",
   "name": "countvctorridgeclassification"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
